//
//  ViewController.m
//  1506计算器
//
//  Created by 小白 on 16/2/20.
//  Copyright © 2016年 小白. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)btncomunicator:(UIButton *)sender {
    //将textbox的值转化成int值
    int value1 = [self.valuetxf.text intValue];
    int value2 = [self.valuetx2.text intValue];
    int value3 = value1+value2;
    //将求和转化成字符串
    NSString *v3 = [NSString stringWithFormat:@"%d",value3];
    //赋值和给第三个textbox
    self.valuetx3.text =v3;
}
@end
